<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2018/1/10
  Time: 14:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
  <head>
    <%

    %>
    <title>登录页面</title>
    <style>
      body{
        text-align: center;
        padding-top: 200px;
        padding-left: 40%;
      }
      #logindiv{
      }
    </style>
    <script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
    <script>
        function changeImg(){
            document.getElementById("imgId").src="/VerifyLoginServlet?"+new Date();
        }
    </script>
  </head>
  <body>



<form action="/LoginServlet" method="get" >

<div id="logindiv">
  <table border="1">
    <tr>
      <td colspan="2"><h5 align="center">请输入帐号密码进行登录：</h5></td>
    </tr>
    <tr>
      <td>选择角色：</td>
      <td><input type="radio" name="role" value="student">学生
        <input type="radio" name="role" value="teacher">老师
        <input type="radio" name="role" value="admin">管理员</td>
    </tr>
    <tr>
      <td>请输入账号：</td>
      <td><input type="text" name="userid"  placeholder="账号" ></td>
    </tr>
    <tr>
      <td>请输入密码：</td>
      <td><input type="password" name="password" placeholder="密码" ></td>
    </tr>
    <tr>
      <td>请输入验证码：</td>
      <td><input type="text" name="vcode"  placeholder="验证码"><br>
        <img src="/VerifyLoginServlet" id="imgId" onclick="changeImg()" class="validationCode_img" >
        <a href="javascript:void(0)" onclick="changeImg()">看不清，换一张</a>
      </td>
    </tr>
    <tr>
      <td colspan="2" align="center"><input type="submit" value="登录" class="loginbutton"></td>
    </tr>
  </table>

</div>
</form>
  </body>
</html>
